#if !defined(ximera_math_plane_hpp)
#define ximera_math_plane_hpp

// -----------------------------------------------------------

#include <ximera/math/vector3.hpp>

namespace ximera { namespace math
{
    class XIMERA_API Plane
    {
    public:
        Vector3 normal;
        Real d;

    public:
        Plane();
        Plane(Vector3 const& normal, Real distance);
        Plane(Real a, Real b, Real c, Real d);
        Plane(Real const abcd[4]);
        Plane(Vector3 const& normal, Vector3 const& point);
        Plane(Vector3 const& p1, Vector3 const& p2, Vector3 const& p3);

        void reset(Vector3 const& normal, Vector3 const& point);
        void reset(Vector3 const& p1, Vector3 const& p2, Vector3 const& p3);

        void normalize();

        Real distance(Vector3 const& point) const;
    };
}}

#include <ximera/math/inline/plane.inl>

// -----------------------------------------------------------

#endif